package com.fw.system.web.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 积分明细表
 * </p>
 *
 * @author ${author}
 * @since 2023-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TbIntegralLog对象", description="积分明细表")
public class TbIntegralLog extends Model<TbIntegralLog> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @ApiModelProperty(value = "变动数量")
    @TableField("integral_num")
    private Integer integralNum;

    @ApiModelProperty(value = "变动类型 1收入 2支出")
    @TableField("is_type")
    private Integer isType;

    @ApiModelProperty(value = "来源去向")
    @TableField("integral_name")
    private String integralName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "用户编号")
    @TableField("user_id")
    private String userId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
